ISCPropertyValueCollection Interface
The following table contains information on the ISCPropertyValueCollection interface:
Signature |
Description |
Valid Arguments |
---|---|---|
ISCPropertyValue * Item(VARIANT ValueId) |
Returns a single value from the property value collection |
ValueId:
|
For r7.3, erwin DM does not support naming of non-scalar property members.
Example 16
The following example illustrates how to access a specific property using C++. The example uses a Model Object object from Example 9:
// This function retrieves a specific value with the given index from the property with the // given name. ISCPropertyValuePtr GetPropValue(ISCModelObjectPtr & scObjPtr, CString & csName, int index) { ISCModelPropertyCollectionPtr propColPtr = scObjPtr->GetProperties(); ISCModelPropertyPtr scObjPropPtr = propColPtr->GetItem(COleVariant(csName)); ISCPropertyValueCollectionPtr propVals = scObjPropPtr->GetPropertyValues(); return propVals->GetItem(COleVariant(index)); }
The following example illustrates how to access a specific property using Visual Basic .NET. The example uses a Model Object object from Example 9:
' This function retrieves a specific value with the given index from the property with the ' given name. Public Function GetPropValue(ByRef scObj As SCAPI.ModelObject, ByRef propName As String, _index As Integer) As SCAPI.PropertyValue Dim scProp as SCAPI.ModelProperty Set scProp = scObj.Properties.Item(propName) Set GetPropValue = scProp.PropertyValues.Item(index) End Function
Copyright © 2025 Quest Software, Inc. |